import React from 'react';
import { Layout, Menu, Form, Input, Button, Checkbox, Space, Row, Col } from 'antd';
import './Home.css';
import LeftNav from '../leftNav/LeftNav';
import {  Routes,Route } from "react-router-dom";
import UserManage from '../../components/user/UserManage'

import { addUser } from "../../axios/api";
import { BrowserRouter } from 'react-router-dom/dist';
const { Header, Content, Footer, Sider } = Layout;


export default class Home extends React.Component {
  componentDidMount() {
    // addUser({
    //   account:'test12224'
    // })
  }
  render() {
    return (
      <Layout className="main-div">
        <Sider
          breakpoint="lg"
          collapsedWidth="0"
          onBreakpoint={broken => {
            console.log(broken);
          }}
          onCollapse={(collapsed, type) => {
            console.log(collapsed, type);
          }}
        >
          <div className="logo" />
          <LeftNav></LeftNav>
        </Sider>
        <Layout>
          <Header className="site-layout-sub-header-background" style={{ padding: 0 }} />
          <Content style={{ margin: '24px 16px 0', width: "" }}>
            <div className="site-layout-background" style={{ padding: 24, height: '100%' }}>
                <Routes>
                  {/* 配置路由 ：主页和登录页 */}
                  <Route path="/home/userManage" exact  element={<UserManage />}></Route>
                </Routes>
             
            </div>
          </Content>
          <Footer style={{ textAlign: 'center' }}> ©2021 Created by New4net.com</Footer>
        </Layout>
      </Layout>

    )
  }
}
